package com.ds.robot.assistant.enums;

/**
 * 作用：主体类型
 *
 * @author WeiShaoying
 * 
 */
public enum PrincipalType {

    Z("自营"),

    J("加盟"),

    A("全部"),

    /**
     * 当只有一种不区分时，用这个
     */
    D("达成值");


    private final String desc;

    PrincipalType(String value) {
        this.desc = value;
    }

    public String getDesc() {
        return desc;
    }

    public static PrincipalType getByValue(String value) {
        for (PrincipalType type : PrincipalType.values()) {
            if (type.desc.equalsIgnoreCase(value)) {
                return type;
            }
        }
        return null;
    }
}
